package system

import "mycms/global"

// @title	后台菜单表
type Menu struct {
	global.Model
	Title      string `json:"title" form:"title" binding:"required" gorm:"not null; comment:路由标题"`
	Name       string `json:"name" form:"name" binding:"required" gorm:"not null; comment:路由名称（英文，前端使用）"`
	ParentId   uint   `json:"isShow" form:"isShow" gorm:"type:int; size:10; default:0; not null; comment:父菜单ID"`
	Path       string `json:"path" form:"path" binding:"required" gorm:"not null; comment:路由path"`
	Status     uint   `json:"status" form:"status" gorm:"type:tinyint; size:1; default:1; not null; comment:状态：0、禁用，1、正常"`
	Sort       int    `json:"sort" form:"sort" gorm:"type:int; size:5; default:0; not null; comment:排序"`
	AlwaysShow uint   `json:"isShow" form:"isShow" gorm:"type:tinyint; size:1; default:1; not null; comment:1、下拉不可打开页面；0、可打开页面"`
	Icon       string `json:"icon" form:"icon" gorm:"comment:菜单图标"`
	Component  string `json:"component" form:"component" gorm:"comment:Vue页面路径"`
	MenuType   uint   `json:"type" form:"type" gorm:"type:int; size:5; comment:类型：1、左则菜单，2、按钮"`
}
